package org.jeecg.modules.demo.crm.util.execl;

import com.aspose.cells.Workbook;
import com.aspose.cells.PdfSaveOptions;

public class AsposeCellsDemo {
    public static void main(String[] args) throws Exception {
        // 读取 Excel 文件
        Workbook workbook = new Workbook("/Users/blithe/dev_tools/work/crm/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/test/输出文件.xlsx");

        // 设置 PDF 保存选项（可选）
        PdfSaveOptions options = new PdfSaveOptions();
        options.setAllColumnsInOnePagePerSheet(true);  // 一页显示所有列

        // 保存为 PDF
        workbook.save("/Users/blithe/dev_tools/work/crm/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/test/output.pdf", options);

        System.out.println("转换完成，生成 output.pdf，免费版会有水印");
    }
}

